package com.lagou.common.feign;

import com.lagou.common.pojo.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @BelongProject: SpringCloudDemo
 * @author: 胡恺恺
 * @createTime: 2021/1/27  11:22
 * @Description:
 */
@FeignClient(name = "lagou-service-goods",fallback = GoodsFeignFallBack.class)
public interface GoodsFeign {

    /**
     * 通过订单id查询商品列表
     *
     * @param id
     * @return
     */
    @GetMapping("/goods/queryById/{id}") //url需要是全路径
    public ResponseResult queryById(@PathVariable("id") Integer id);

}
